<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | 王勇程 <laughskydragon@qq.com>                         |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

return [
    // 默认缓存驱动
    'default' => env('cache.driver', 'file'),

    // 缓存连接配置
    'stores'  => [
        'file' => [
            'type'   => 'File',
            'path'   => \think\facade\App::getInstance()->getRuntimePath() . 'cache',
            'prefix' => 'yiyanjiuding_',
            'expire' => 3600, // 默认1小时过期
        ],
        'redis'   =>  [
            // 驱动方式
            'type'   => 'redis',
            // 服务器地址
            'host'   => env('redis.host', '127.0.0.1'),
            // 端口
            'port'   => env('redis.port', 6379),
            // 密码
            'password' => env('redis.password', ''),
            // 缓存前缀
            'prefix' => '',
            // 缓存有效期 0表示永久缓存
            'expire' => 0,
        ],
    ],
];